package com.shujia.wyh.day05;


class Student {
    //成员变量
    private String name = "陈涛";
    private int age = 15;

    //构造方法
    Student() {
    }

    Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void show() {
        System.out.println("姓名:" + name + ",年龄：" + age);
    }
}

public class StudentDemo {
    public static void main(String[] args) {
        Student student = new Student("吴涛",18);
        student.show();
    }
}
